﻿using System;
using System.Text;

namespace _020_堆
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder ref1 = new StringBuilder("object1");
            Console.WriteLine(ref1);
            // 引用StringBuilder对象的ref1现在被垃圾回收器选中

            StringBuilder ref2 = new StringBuilder("object2");
            StringBuilder ref3 = ref2;
            // 引用StringBuilder对象的ref2现在没有被垃圾回收器选中
            Console.WriteLine(ref3);
        }
    }
}
